<?php



class CountriesMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.CountriesMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('countries');
		$tMap->setPhpName('Countries');

		$tMap->setUseIdGenerator(true);

		$tMap->addColumn('ISO_3166_ALPHA2', 'Iso3166Alpha2', 'string', CreoleTypes::VARCHAR, false, 8);

		$tMap->addColumn('ISO_3166_ALPHA3', 'Iso3166Alpha3', 'string', CreoleTypes::VARCHAR, false, 8);

		$tMap->addColumn('ISO_3166_NUMERIC', 'Iso3166Numeric', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('FIPS', 'Fips', 'string', CreoleTypes::VARCHAR, false, 255);

		$tMap->addColumn('COUNTRY', 'Country', 'string', CreoleTypes::VARCHAR, false, 255);

		$tMap->addColumn('CAPITAL', 'Capital', 'string', CreoleTypes::VARCHAR, false, 255);

		$tMap->addColumn('AREA_KM', 'AreaKm', 'double', CreoleTypes::FLOAT, false, null);

		$tMap->addColumn('POPULATION', 'Population', 'double', CreoleTypes::FLOAT, false, null);

		$tMap->addColumn('CONTINENT', 'Continent', 'string', CreoleTypes::VARCHAR, false, 8);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

	} 
} 